package com.mchat.config;

import io.minio.MinioAsyncClient;
import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


import java.net.URI;
@Configuration
public class OSSConfig {
    @Value("${oss.endpoint}")
    private String endpoint;
    @Value("${oss.accessKey}")
    private String accessKey ;
    @Value("${oss.secretKey}")
    private String secretKey ;
    @Bean
    public MinioAsyncClient Client(){
        return MinioAsyncClient.builder()
                .endpoint(endpoint)
                .credentials(accessKey,secretKey)
                .build();
    }
}
